package com.breakfast.fun.data.entity.home.cart;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by yukai on 16/9/22.
 */

public class SendTime {

    /**
     * version : 1.0
     * success : true
     * msg :
     * data : ["08:00~08:15","08:15~08:30","08:30~08:45","08:45~09:00","09:00~09:15","09:15~09:30"]
     */

    private String version;
    private boolean success;
    private String msg;
    private List<String> data;

    public static SendTime objectFromData(String str) {

        return new Gson().fromJson(str, SendTime.class);
    }

    public static List<SendTime> arraySendTimeFromData(String str) {

        Type listType = new TypeToken<ArrayList<SendTime>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<String> getData() {
        return data;
    }

    public void setData(List<String> data) {
        this.data = data;
    }
}
